package net.lahuobao.finance.entity.depart;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by Administrator on 2016/9/19.
 */
@Entity
@Table(name = "lahuobao.user")
@DynamicUpdate(true)
@DynamicInsert(true)
public class User {

    private long            userId;                     //用户ID
    private String          userName;                   //用户姓名
    private String          password;                   //密码
    private String          fullName;                   //真实姓名
    private String          photo;                      //用户头像
    private String          idcard;                     //身份证号码
    private String          idcardImg;                  //身份证图片
    private Date            regDatetime;                //注册时间
    private int             validateState;              //验证状态
    private int             state;                      //用户状态
    private Date            validateDatetime;           //验证时间
    private int             type;                       //会员类型 0是普通用户 1是机构



    @Column(name = "fullname")
    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    @Column(name = "idcard")
    public String getIdcard() {
        return idcard;
    }

    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }

    @Column(name = "idcard_img")
    public String getIdcardImg() {
        return idcardImg;
    }

    public void setIdcardImg(String idcardImg) {
        this.idcardImg = idcardImg;
    }

    @Column(name = "password")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Column(name = "photo")
    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    @Column(name = "reg_datetime")
    public Date getRegDatetime() {
        return regDatetime;
    }

    public void setRegDatetime(Date regDatetime) {
        this.regDatetime = regDatetime;
    }

    @Column(name = "state")
    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "user_id")
    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    @Column(name = "user_name")
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Column(name = "vallidate_datetime")
    public Date getValidateDatetime() {
        return validateDatetime;
    }

    public void setValidateDatetime(Date validateDatetime) {
        this.validateDatetime = validateDatetime;
    }

    @Column(name = "validate_State")
    public int getValidateState() {
        return validateState;
    }

    public void setValidateState(int validateState) {
        this.validateState = validateState;
    }

    @Column(name = "type")
    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}
